<?php

if (isset($_GET['newsID']))
{
	$newsid = $_GET['newsID'];
	require_once('common/connectdb.php');


	$ConnectDB = new ConnectDB();
	$qNews = "SELECT * FROM tb_news where news_id='$newsid'";
	$rNews = $ConnectDB->run_query($qNews);

	if(mysql_num_rows($rNews)!=0)
	{	
		$row = mysql_fetch_array($rNews);
		echo"<NEWS>";

		//echo 	"\n\t<ID>".$row["news_id"]."</ID>";
		echo	"\n\t<TITLE>".$row["news_title"]."</TITLE>";
		echo	"\n\t<BODY>".$row["news_body"]."</BODY>";
		echo	"\n\t<DATE>".$row["news_date"]."</DATE>";
		echo	"\n\t<AUTHOR>".$row["news_author"]."</AUTHOR>";
		echo"\n</NEWS>";
	} 
	else 
	{
		echo "<code>1</code>";
	}
} 
else 
{
	echo "<code>1</code>";
}
?>
